<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('下级退回信件工单审核')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="post-form">
                <div class="select-list">
                    <ul>
                        <li>
                            工单编号：<input type="text" name="workFormNo"/>
                        </li>
                        <li>
                            派发单位：<input type="text" name="sdeptName"/>
                        </li>

                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

<!--        <div class="btn-group-sm " id="toolbar" role="group">-->
<!--            <a class="btn btn-success multiple disabled" onclick="$.operate.handleTab()">-->
<!--                <i class="fa fa-plus"></i> 处理-->
<!--            </a>-->
<!--        </div>-->

        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "system/mMailWF";

    $(function () {
        var options = {
            url: prefix + "/cmnFile/mmReturnFlowJson",
            sortName: "pkid",
            sortOrder: "desc",
            updateUrl: prefix + "/cmnFile/mmReturnReason/{id}",
            // removeUrl: prefix + "/cmnFile/remove",
            uniqueId: "myPkVal",
            modalName: "下级退回信件工单审核",
            fixedColumns: true,
            fixedNumber: 1,
            fixedRightNumber: 1,
            columns: [
                {field: 'ck', checkbox: true, title: '&nbsp;'},
                {field:'myPkVal',title:'pkid',hidden:true,visible : false},
                {field:'WfId',title:'WfId',hidden:true,visible : false},
                {field:'MailPK',title:'MailPK',hidden:true,visible : false},
                {field:'myMwfNO',title:'工单编号',align:'center',halign:'center',sortable:true},
                {field:'source',title:'信件来源',align:'center',halign:'center',sortable:true},
                {field:'myMwfTopic',title:'工单主题',align:'center',halign:'center',
                    formatter:function (value, row, index) {
                        return "<span style='cursor: pointer;' title='"+value+"'>"+value+"</span>"
                    },
                    cellStyle: cellEllipsis
                },
                {field:'SeqName',title:'交办次序',align:'center'},
                {field:'SortName',title:'性质',align:'center',sortable:true},
                {field:'DealName',title:'办理方式',align:'center',sortable:true},
                {field:'bkLimit',title:'办理期限',align:'center'},
                {field:'SDeptName',title:'派发单位',align:'center',halign:'center',sortable:true},
                {field:'sdDate',title:'派发日期',align:'center'},
                {field:'bkDate',title:'退回日期',align:'center'},
                {field:'BackRemark',title:'退回理由',align:'center',halign:'center',
                    formatter:function (value, row, index){
                        return "<span style='cursor: pointer;' title='"+value+"'>"+value+"</span>"
                    },
                    cellStyle:cellEllipsis
                },
                {field:'FlagString',title:'转办情况',align:'center',halign:'center',sortable:true},
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.handleTab(\''+row.myPkVal+'\')"><i class="fa fa-edit"></i>审核</a> ');
                        actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="OnQxListShowWin(\''+row.WfId+'\')"><i class="fa fa-edit"></i>详情</a> ');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });

    function OnQxListShowWin(idWF) {
        var url = 'system/lookup/mailOrderDetail/' + idWF;
        $.modal.openTab('信件工单-详情',url);
    }
</script>
</body>
</html>